package com.gmss.crawler.module.retraction.paperauthor.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gmss.crawler.module.retraction.paperauthor.domain.RPaperAuthor;
import com.gmss.crawler.module.retraction.paperauthor.mapper.RPaperAuthorMapper;
import com.gmss.crawler.module.retraction.paperauthor.service.IRPaperAuthorService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 撤稿论文作者表 服务实现类
 * </p>
 *
 * @author Auto-generator
 * @since 2021-12-20
 */
@Service
public class RPaperAuthorServiceImpl extends ServiceImpl<RPaperAuthorMapper, RPaperAuthor> implements IRPaperAuthorService {

    @Resource
    private RPaperAuthorMapper rPaperAuthorMapper;

    @Override
    public List<Map> queryRPaperAuthorAndCompany(List<Long> rPaperIdList) {
        List<Map> authorMap = rPaperAuthorMapper.queryRPaperAuthorAndCompany(rPaperIdList);
        if (CollectionUtils.isEmpty(authorMap))
            return null;
        return authorMap;
    }
}
